#pragma once
#include <stdlib.h>
#include "glut.h"
#include <highgui.h>

using namespace std;

class traceManager
{
protected:
	vector<CvPoint3D32f> _trace;

public:

	void push(CvPoint3D32f* point)
	{
		_trace.push_back(*point);
	}

	void showTrace()
	{
		float aspect = 1;
		for (int i = 0, maxi = _trace.size(); i < maxi; i++)
		{
			glPushMatrix();
			CvPoint3D32f* p = &(_trace[i]);
			glTranslatef(p->x * aspect, p->y * aspect, p->z * aspect);
			glutSolidSphere(10,5,5);
			glPopMatrix();
		}

	}
};